#!/bin/bash


JAR_NAME=jd-core-java-1.2.jar
DIRNAME=$(dirname "$(readlink -e "$0")")
DIR=$(cd "$DIRNAME" || exit 112; pwd)


help_info() {
    echo -e "\n    Usage: jd-cli [Options] <xxx.jar> [<destination>].\n"      \
        "\n    Options:"                                                      \
        "\n\t-z save sources into a zip file."                                \
        "\n\t-n add line numbers into sources (false by default)."            \
        "\n\t-r not realign line numbers (true by default)."                  \
        "\n\t-h(--help)   \tshow this help info.\n"
}

case "$1" in
    "-h"|"--help"|"")
        help_info
        ;;
    *)
        java -jar "$DIR/$JAR_NAME" $@
        ;;
esac
